#include <QtCore>
#include <QtDBus>
#include <assert.h>
#include <string>
using namespace std;
int main(int argc, char *argv[])
{
#ifdef _DEBUG
	qDebug() << "debug";
#endif
	QDBusConnection dbus("1688");
	//QDBusConnection dbus = QDBusConnection::sessionBus();
	QString serviceName = "1688";
	bool ret = dbus.isConnected();
	if (!ret)
		qDebug() << "cannot connect to the D-Bus session bus";
	else {
		ret = dbus.registerService(serviceName);
		if (!ret) 
			qDebug() << serviceName << "=" << dbus.lastError().message();
	}
	return 0; 
}

